﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameStop_UI : MonoBehaviour
{
    [SerializeField] GameObject HandBook_;
    private bool isShow = false;

    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (isShow)
            {
                unshow();
            }
            else
            {
                show();
            }
        }
    }

    public void unshow()
    {
        this.GetComponent<UI_Panel>().unShow();
        isShow = false;

    }
    public void show()
    {
        this.GetComponent<UI_Panel>().Show();
        isShow = true;
    }

    public void HandBook()
    {
        var clo = Instantiate(HandBook_, null);
    }


    public void BackTheStart()
    {
        LoadScene_Async.LoadScene("TheStart");
    }

}
